//
//  SupplyBusinessViewController.m
//  xiangmu
//
//  Created by lanou3g on 15/5/30.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "SupplyBusinessViewController.h"

@interface SupplyBusinessViewController ()

@end

@implementation SupplyBusinessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //导航栏标题
 self.navigationController.title=@"供应商管理";
    //视图背景图片
   self.view.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"34_bg_denglu"]]; 

    
    [self barButtonSet];
    //设置搜索框的回收代理
    _searchInform.delegate=self;
    
}
#pragma mark---------------------导航栏上按钮的设置
-(void)barButtonSet{
    //左按钮,返回主页
    UIBarButtonItem *leftBI=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"iconfont-xiangzuo.png"] style:UIBarButtonItemStylePlain target:self action:@selector(returnMainVC:)];
    self.navigationItem.leftBarButtonItem=leftBI;
    //右按钮,进入添加供应商页面
    UIBarButtonItem *rightBI=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"iconfont-jia.png"] style:UIBarButtonItemStylePlain target:self action:@selector(enterSupplyBusinessDetailVC:)];
   self.navigationItem.rightBarButtonItem=rightBI;
}

#pragma mark--------------左按钮,返回主页
-(void)returnMainVC:(UIBarButtonItem *)BI{
    
   [self.navigationController popViewControllerAnimated:YES];

}
#pragma mark-------------右按钮,进入添加供应商页面
-(void)enterSupplyBusinessDetailVC:(UIBarButtonItem *)BI{
    SupplyBusinessDetailViewController *supplyBusinessDetailVC=[[SupplyBusinessDetailViewController alloc] initWithNibName:@"SupplyBusinessDetailViewController" bundle:[NSBundle mainBundle]];
    [self.navigationController pushViewController:supplyBusinessDetailVC animated:YES];

}
#pragma mark--------------搜索框回收键盘

- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
{
    
    [searchBar resignFirstResponder];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
